# -*- coding: utf-8 -*-
# @Time    : 2023/5/20 15:34
# @Author  : Pan
# @Software: PyCharm
# @Project : VisualFramework
# @FileName: __init__.py

import paddle
from .SimMIM import SwinTransformer_tiny_patch4_window7_224, SwinTransformer_base_patch4_window7_224, SwinTransformer_large_patch4_window7_224


def mae(config):
    model = eval(config["type"])(config)
    if "pretrained" in config and config["pretrained"] is not None:
        model.set_state_dict(paddle.load(config["pretrained"]))
    return model
